-
Notifications
You must be signed in to change notification settings - Fork 17
feat: add lighthouse test to CI #487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds automated Lighthouse CI performance testing to the workflow and implements a performance optimization for the orchestrator list rendering. The optimization defers rendering of the OrchestratorList component using requestAnimationFrame to allow the browser to paint the initial page layout first.
Changes:
- Added Lighthouse CI workflow that waits for Vercel preview deployments and runs performance tests
- Configured Lighthouse with desktop preset and performance thresholds for key metrics
- Implemented deferred rendering for OrchestratorList on home and orchestrators pages using requestAnimationFrame
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/lighthouse-vercel-preview.yml | New workflow that polls for Vercel preview deployment and runs Lighthouse CI tests |
| .lighthouserc.json | Lighthouse configuration with performance assertions for LCP, CLS, TBT, and overall score |
| package.json | Added @lhci/cli and wait-on as dev dependencies |
| pnpm-lock.yaml | Lock file updates for new dependencies and their transitive dependencies |
| pages/orchestrators.tsx | Added requestAnimationFrame-based deferred rendering of OrchestratorList |
| pages/index.tsx | Added requestAnimationFrame-based deferred rendering of OrchestratorList |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request introduces automated Lighthouse performance checks to the CI workflow. It adds a dedicated Lighthouse job that runs on pull requests targeting the
mainbranch, sets up the required configuration for Lighthouse CI, and updates dependencies to support these checks.Pages that it checks:
/orchestratorsleaderboardtransactionsvotingtreasurySpeed Improvements
OrchestorsListnow renders only after the UI layout is painted, making the home and orchestrators page much faster when there is no cache availableCI/CD Pipeline Enhancements:
lighthousejob to.github/workflows/ci.ymlthat installs dependencies, builds the project, starts the server, waits for it to be ready, and then runs Lighthouse CI for PRs targetingmain.Performance Testing Configuration:
.lighthouserc.jsonwith Lighthouse CI settings, including test URLs, run count, desktop emulation, and performance assertions for key metrics like performance score, LCP, CLS, and TBT.Dependency Updates:
@lhci/clias a dev dependency inpackage.jsonto enable running Lighthouse CI in the workflow.wait-onas a dev dependency inpackage.jsonto allow the workflow to wait for the server to be ready before running Lighthouse.